package com.ruoyi.erp.controller;

import com.ruoyi.common.annotation.PrintLnTime;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.erp.domain.ErpProject;
import com.ruoyi.erp.service.IErpProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/erp/project")
public class ErpProjectController extends BaseController {

    private String prefix = "erp/project";

    @Autowired
    private IErpProjectService erpProjectService;

    @GetMapping("/list")
    @ResponseBody
    @PrintLnTime
    public List<ErpProject> list(){
        List<ErpProject> erpProjects = erpProjectService.selectErpProjectList();
        System.out.println(erpProjects);
        return erpProjects;
    }
}
